x11: Fix in_rectangle computation
authorBenjamin Otte <otte@redhat.com>
Mon, 22 Nov 2010 23:56:33 +0000 (00:56 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Dec 2010 19:21:03 +0000 (20:21 +0100)
A point is not in a rectangle when it's at the x + width coordinate.

gdk/x11/gdkdevice-core.c

index 06182240e2affe81e64625f063a15940d728ceb7..008e339b013512e010fea68068c11a4056df00c6 100644 (file)
@@ -106,11 +106,11 @@ impl_coord_in_window (GdkWindow *window,
                      int        impl_y)
 {
   if (impl_x < window->abs_x ||
-      impl_x > window->abs_x + window->width)
+      impl_x >= window->abs_x + window->width)
     return FALSE;
 
   if (impl_y < window->abs_y ||
-      impl_y > window->abs_y + window->height)
+      impl_y >= window->abs_y + window->height)
     return FALSE;
 
   return TRUE;